/** 描述应用的状态流程 */

/** 没有被加载过 */
export const NOT_LOAED = "NOT_LOAED"
/** 加载资源 */
export const LOADING_SPURCE_CODE = "LOADING_SPURCE_CODE"
/** 还没有调用bootstrap方法 */
export const NOT_BOOTSTRAPPED = "NOT_BOOTSTRAPPED"
/** 启动中 */
export const BOOTSTRAPPING = "BOOTSTRAPPING"
/** 没有调用mounted方法 */
export const NOT_MOUNTED = "NOT_MOUNTED"
/** 正在挂载中 */
export const MOUNTING = "MOUNTING"
/** 挂载完毕 */
export const MOUNTED = "MOUNTED"
/** 更新中 */
export const UPDATING = "UPDATING"
/** 解除挂载 */
export const UNMOUNTING = "UNMOUNTING"
/** 完全卸载中 */
export const UNLOADING = "UNLOADING"
/** 加载资源失败 */
export const LOAD_ERR = "LOAD_ERR"
/** 代码出错 */
export const SKIP_BECAUSE_BROKEN = "SKIP_BECAUSE_BROKEN"

/** 当前应用是否被激活 */
export function isActive(app){
  return app.status === MOUNTED
}

/** 当前应用是否要被激活 */
export function shouldBeActive(app){
  return app.activeFn(window.location)
}